{
    "channelID": "_ch{{ item.channelnum|int }}",
{% if chaincode == "samplecc" %}
    "chaincodeID": "sample_cc",
{% elif chaincode == "samplejs" %}
    "chaincodeID": "sample_js",
{% elif chaincode == "marbles02_private" %}
    "chaincodeID": "marbles_cc_priv",
{% elif chaincode == "marbles02" %}
    "chaincodeID": "marbles_cc",
{% endif %}
    "chaincodeVer": "v0",
    "logLevel": "ERROR",
    "invokeCheck": "TRUE",
    "transMode": "{{ transMode }}",
    "transType": "Invoke",
    "invokeType": "Query",
    "targetPeers": "{{ targetPeers }}",
    "nProcPerOrg": "{{ nProcPerOrg }}",
    "nRequest": "100",
    "runDur": "0",
    "peerFailover": "{{ peerFailover }}",
    "ordererFailover": "{{ ordererFailover }}",
    "TLS": "{{ TLS }}",
    "channelOpt": {
        "name": "{{ item.name }}",
        "action":  "create",
        "orgName": [
{% set index = ((item.channelnum|int * item.orgs|length) - (item.orgs|length - 1)) -%}
{% for orgName in item.orgs %}
{% if not loop.last %}
            "org{{ index + loop.index0 }}",
{% else %}
            "org{{ index + loop.index0 }}"
{% endif %}
{% endfor %}
        ]
    },
{% if transMode == "Burst" %}
    "burstOpt": {
        "burstFreq0":  "{{ burstFreq0 }}",
        "burstDur0":  "{{ burstDur0 }}",
        "burstFreq1": "{{ burstFreq1 }}",
        "burstDur1": "{{ burstDur1 }}"
    },
{% elif transMode == "Mix" %}
    "mixOpt": {
        "mixQuery": "{{ mixQuery }}",
        "mixFreq": "{{ mixFreq }}"
    },
{% elif transMode == "Constant" %}
    "constantOpt": {
        "recHist": "{{ recHist }}",
        "constFreq": "0",
        "devFreq": "{{ devFreq }}"
    },
{% endif %}
{% if targetPeers == "LIST" %}
    "listOpt": {
        "org1": ["peer1"],
        "org2": ["peer1"]
    },
{% elif targetPeers == "Discovery" %}
    "discoveryOpt": {
        "localHost": "false"
    },
{% endif %}
    "eventOpt": {
        "type": "{{ eventType }}",
        "listener": "{{ eventListener }}",
        "timeout": "{{ eventTimeout }}"
    },
    "failoverOpt": {
        "method": "{{ method }}",
        "list": "{{ list }}"
    },
    "timeoutOpt": {
        "preConfig": "{{ preconfig }}",
        "request": "{{ request }}",
        "grpcTimeout": "{{ grpcTimeout }}"
    },
{% if chaincode == "samplecc" or chaincode == "samplejs" %}
    "ccType": "ccchecker",
{% elif chaincode == "marbles02" %}
    "ccType": "marblescc",
{% elif chaincode == "marbles02_private" %}
    "ccType": "marblescc_priv",
{% endif %}
    "ccOpt": {
{% if chaincode == "samplecc" or chaincode == "samplejs" %}
        "keyIdx": [1],
{% elif chaincode == "marbles02" or chaincode == "marbles02_private" %}
        "keyIdx": [0],
{% endif %}
        "keyPayLoad": [2],
        "keyStart": "0",
        "payLoadType": "{{ payLoadType }}",
        "payLoadMin": "{{ payLoadMin }}",
        "payLoadMax": "{{ payLoadMax }}"
    },
    "invoke": {
{% if chaincode == "samplecc" or chaincode == "samplejs" %}
        "move": {
            "fcn": "invoke",
            "args": ["put", "a1","1"]
        },
        "query": {
            "fcn": "invoke",
            "args": ["get", "a1"]
        }
{% elif chaincode == "marbles02" %}
        "nOwner":"10000",
        "move": {
            "fcn": "initMarble",
            "args": ["marble", "white","35","tom"]
        },
        "query": {
            "fcn": "readMarble",
            "args": ["marble"]
        }
{% elif chaincode == "marbles02_private" %}
        "nOwner":"10000",
        "move": {
            "fcn": "initMarble",
            "args": ["marble", "blue","35","tom","99"]
        },
        "query": {
            "fcn": "readMarblePrivateDetails",
            "args": ["marble"]
        }
{% endif %}
    },
    "SCFile": [
               {"ServiceCredentials":"CITest/CISCFiles/config-chan{{ item.channelnum|int }}-TLS.json"}
        ]
}
